home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Compression / Opener / Source / utils / gzip / Makefile < prev    next >
Makefile  |  1994-03-08  |  12KB  |  388 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  3. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. # $Id: Makefile.in,v 0.23 1993/06/24 11:51:47 jloup Exp $
  20.  
  21. #### Start of system configuration section. ####
  22.  
  23.  
  24. srcdir = .
  25. VPATH = .
  26.  
  27. CC = cc
  28. ASCPP = /lib/cpp
  29.  
  30. INSTALL = /usr/bin/install -c
  31. INSTALL_PROGRAM = $(INSTALL)
  32. INSTALL_DATA = $(INSTALL) -m 644
  33.  
  34. # Things you might add to DEFS (configure usually figures out what to do):
  35. # -DGNU_STANDARD        Behave as gzip even if invoked as gunzip (GNU standard)
  36. # -DDIRENT              Use <dirent.h>  for recursion (-r)
  37. # -DSYSDIR              Use <sys/dir.h> for recursion (-r)
  38. # -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
  39. # -DNDIR                Use <ndir.h> for recursion (-r)
  40. # -DSTDC_HEADERS        Use <stdlib.h>
  41. # -DHAVE_UNISTD_H    Use <unistd.h>
  42. # -DNO_FCNTL_H          Don't use <fcntl.h>
  43. # -DNO_UTIME_H        Don't use <utime.h>
  44. # -DHAVE_SYSUTIME_H    Use <sys/utime.h>
  45. # -DNO_MEMORY_H         Don't use <memory.h>. Not needed if STDC_HEADERS.
  46. # -DNO_STRING_H         Use strings.h, not string.h. Not needed if STDC_HEADERS
  47. # -DRETSIGTYPE=int      Define this if signal handlers must return an int.
  48. # -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
  49. # -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
  50. # -DNO_UTIME        System does not support setting file modification time
  51. # -DNO_CHOWN        System does not support setting file owner
  52. # -DNO_DIR        System does not support readdir()
  53. # -DPROTO        Force function prototypes even if __STDC__ not defined
  54. # -DASMV        Use asm version match.S
  55. # -DMSDOS        MSDOS specific
  56. # -DOS2            OS/2 specific
  57. # -DVAXC        Vax/VMS with Vax C compiler
  58. # -DVMS            Vax/VMS with gcc
  59. # -DDEBUG        Debug code
  60. # -DDYN_ALLOC        Use dynamic allocation of large data structures
  61. # -DMAXSEG_64K        Maximum array size is 64K (for 16 bit system)
  62. # -DRECORD_IO           read() and write() are rounded to record sizes.
  63. # -DNO_STDIN_FSTAT      fstat() is not available on stdin
  64. # -DNO_FSTAT            fstat() is not available
  65. # -DNO_SIZE_CHECK       stat() does not give a reliable file size
  66.  
  67. DEFS =  -DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DSYSDIR=1
  68. LIBS = 
  69.  
  70. # additional assembly sources for particular systems may be required.
  71. OBJA = match.o
  72.  
  73. SEDCMD = 1d
  74.  
  75. CFLAGS = -O
  76. # If you want debug on by default, use: CFLAGS="-g" ./configure
  77. LDFLAGS = $(CFLAGS)
  78.  
  79. G=
  80. # To install znew, zmore, etc... as gznew, gzmore... use: G=g
  81.  
  82. ZCAT=zcat
  83. # To install zcat executable and man page as gzcat, use: ZCAT=gzcat
  84.  
  85. X=
  86. # For OS/2 or MSDOS, use: X=.exe
  87.  
  88. O=.o
  89. # For OS/2 or MSDOS, use: O=.obj
  90.  
  91. prefix = /usr/local
  92. exec_prefix = ${prefix}
  93.  
  94. bindir = $(exec_prefix)/bin
  95. scriptdir = $(bindir)
  96. # scriptdir is the directory in which shell scripts should be installed
  97. datadir = $(prefix)/lib
  98. libdir = $(prefix)/lib
  99. infodir = $(prefix)/info
  100.  
  101. # Extension (not including `.') for the installed manual page filenames.
  102. manext = 1
  103. # Where to install the manual pages.
  104. mandir = $(prefix)/man/man$(manext)
  105. # Use manlinks=so to use the .so method instead of hard links
  106. manlinks = ln
  107.  
  108. alldirs = $(bindir) $(scriptdir) $(datadir) $(libdir) $(infodir) $(mandir)
  109.  
  110. #### End of system configuration section. ####
  111.  
  112. SHELL = /bin/sh
  113.  
  114. LOADLIBES = $(LIBS)
  115.  
  116. TAR = tar
  117.  
  118. SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
  119.        lzw.c unlzw.c unpack.c unlzh.c getopt.c match.S
  120.  
  121. OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
  122.        crypt$O lzw$O unlzw$O unpack$O unlzh$O getopt$O $(OBJA)
  123.  
  124. HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
  125.  
  126. GENFILES =  README NEWS INSTALL Makefile.in configure.in configure COPYING \
  127.   TODO THANKS ChangeLog $(SRCS) $(HDRS) zmore.in znew.in zdiff.in zgrep.in \
  128.   zforce.in gzexe.in gzip.1 zdiff.1 zgrep.1 zmore.1 znew.1 gzexe.1 zforce.1 \
  129.   gzip.doc algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info
  130.  
  131. sampleFILES =  sample/makecrc.c sample/zread.c sample/add.c sample/sub.c \
  132.        sample/ztouch sample/zfile
  133.  
  134. msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
  135.   msdos/Makefile.msc msdos/Makefile.bor msdos/Makefile.djg
  136.  
  137. os2FILES = os2/Makefile.os2 os2/gzip.def os2/gzip16.def
  138.  
  139. ntFILES = nt/Makefile.nt
  140.  
  141. vmsFILES = vms/Readme.vms vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com \
  142.    vms/Makefile.mms vms/vms.c vms/gzip.hlp
  143.  
  144. amigaFILES = amiga/Makefile.sasc amiga/Makefile.gcc amiga/tailor.c \
  145.   amiga/utime.h amiga/match.a
  146.  
  147. atariFILES = atari/Makefile.st
  148.  
  149. primosFILES = primos/readme primos/primos.c primos/ci.opts \
  150.    primos/build.cpl primos/include/errno.h primos/include/fcntl.h \
  151.    primos/include/stdlib.h primos/include/sysStat.h primos/include/sysTypes.h
  152.  
  153. DISTFILES = $(GENFILES) $(sampleFILES) $(msdosFILES) $(os2FILES) $(ntFILES)\
  154.    $(vmsFILES) $(amigaFILES) $(atariFILES) $(primosFILES)
  155.  
  156. SCRIPTS = $(G)zdiff $(G)zgrep $(G)zmore $(G)znew $(G)zforce gzexe
  157.  
  158. .c$O:
  159.     $(CC) -c $(DEFS) $(CFLAGS) $<
  160.  
  161. #.PHONY: default all force test check
  162.  
  163. default:  gzip$X
  164. all:    gzip$X $(G)zdiff $(G)zgrep $(G)zmore $(G)znew $(G)zforce gzexe
  165. force:
  166.  
  167. #### Start of specific targets section. ####
  168. #
  169. # 'configure' works only on Unix systems. For other systems able to make
  170. # sense of this makefile, you can define target specific entries here.
  171. # For other systems such as MSDOS, separate Makefiles are
  172. # provided in subdirectories.
  173.  
  174. # NeXT 2.x, 3.0, 3.1 thin. For gcc, replace -bsd with -D__STRICT_BSD__.
  175. next:
  176.     $(MAKE) all CFLAGS="-O -bsd -DASMV" \
  177.     DEFS="-DNO_STDLIB_H -DNO_STRING_H -DNO_UTIME_H -DSYSDIR -DRETSIGTYPE=int"
  178.  
  179. # NeXT 3.1 fat (68k + 386). For gcc, replace -bsd with -D__STRICT_BSD__.
  180. next-fat:
  181.     $(MAKE) all OBJA=match-next.o \
  182.     CFLAGS="-O2 -bsd -DASMV -fno-builtin -arch m68k -arch i386" \
  183.     DEFS="-DNO_STDLIB_H -DNO_STRING_H -DNO_UTIME_H -DSYSDIR -DRETSIGTYPE=int"
  184.  
  185. match-next.o: match.S
  186.     cat $(srcdir)/match.S > match-next.s
  187.     $(CC) -arch m68k -arch i386 -c match-next.s
  188.     rm -f match-next.s
  189.  
  190. # gcc with emx 0.8f kit (use by preference os2/Makefile.os2)
  191. os2_gcc:
  192.     $(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
  193.  
  194. # Xenix 2.3.2 for 286:
  195. xenix_286:
  196.     $(MAKE) all CFLAGS="-LARGE -M2l"
  197.  
  198. # Coherent (with broken /bin/sh):
  199. coherent:
  200.     $(MAKE) all OBJA=match.o DEFS=\
  201.     "-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1"
  202.  
  203. #### End of specific targets section. ####
  204.  
  205. install: installdirs installbin installman
  206.  
  207. installbin: all
  208.     $(INSTALL_PROGRAM) gzip$X $(bindir)/gzip$X
  209.     for f in $(SCRIPTS); do \
  210.       $(INSTALL_PROGRAM) $${f} $(scriptdir)/$${f}; done
  211.     rm -f $(scriptdir)/$(G)zcmp; \
  212.       ln $(scriptdir)/$(G)zdiff $(scriptdir)/$(G)zcmp
  213.     for f in gunzip$X ungzip$X $(ZCAT)$X ; do \
  214.       rm -f $(bindir)/$${f}; done
  215.     @if echo $(DEFS) | grep GNU_STANDARD > /dev/null; then \
  216.       echo 'exec gzip -d  $${1+"$$@"}' > $(bindir)/gunzip$X; \
  217.       echo 'exec gzip -dc $${1+"$$@"}' > $(bindir)/$(ZCAT)$X; \
  218.       chmod 755 $(bindir)/gunzip$X  $(bindir)/$(ZCAT)$X; \
  219.     else \
  220.       ln $(bindir)/gzip$X $(bindir)/gunzip$X; \
  221.       ln $(bindir)/gzip$X $(bindir)/$(ZCAT)$X; \
  222.     fi
  223.  
  224. installman: gzip.info
  225.     for f in gzip gunzip $(ZCAT) $(SCRIPTS) $(G)zcmp; do \
  226.       rm -f $(mandir)/$${f}.$(manext); done
  227.     -cd $(srcdir); for f in gzip gzexe; do \
  228.       $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
  229.     -cd $(srcdir); for f in zdiff zgrep zmore znew zforce; do \
  230.       $(INSTALL_DATA) $${f}.1 $(mandir)/$(G)$${f}.$(manext); done
  231.     -cd $(mandir); if test $(manlinks) = so; then \
  232.       echo .so man$(manext)/gzip.$(manext)      > $(ZCAT).$(manext);\
  233.       echo .so man$(manext)/$(G)zdiff.$(manext) > $(G)zcmp.$(manext);\
  234.       echo .so man$(manext)/gzip.$(manext)      > gunzip.$(manext);\
  235.       chmod 644 $(ZCAT).$(manext) $(G)zcmp.$(manext) gunzip.$(manext);\
  236.     else \
  237.       ln gzip.$(manext)  $(ZCAT).$(manext);\
  238.       ln $(G)zdiff.$(manext) $(G)zcmp.$(manext);\
  239.       ln gzip.$(manext)  gunzip.$(manext);\
  240.     fi
  241.     -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
  242.       $(infodir)/$${f}; done
  243.  
  244. uninstall: force
  245.     -cd $(bindir); rm -f gzip$X gunzip$X $(ZCAT)$X
  246.     -cd $(scriptdir); rm -f $(SCRIPTS) $(G)zcmp
  247.     -for f in gzip gunzip $(ZCAT) $(SCRIPTS) $(G)zcmp; do \
  248.       rm -f $(mandir)/$${f}.$(manext); done
  249.     -cd $(infodir); rm -f gzip.info*
  250.  
  251. # install all files and replace compress (not recommended)
  252. install_compress: install
  253.     -test -f $(bindir)/compress.old || \
  254.       mv $(bindir)/compress$X $(bindir)/compress.old
  255.     ln $(bindir)/gzip$X $(bindir)/compress$X
  256.     rm -f $(bindir)/uncompress$X
  257.     ln $(bindir)/gzip$X $(bindir)/uncompress$X
  258.  
  259. # Make sure all installation directories, e.g. $(bindir) actually exist by
  260. # making them if necessary. At most one level is created (except for man).
  261. installdirs:
  262.     -if test ! -d $(prefix)/man; then \
  263.        mkdir $(prefix)/man; fi
  264.     -for dir in $(alldirs) ; do \
  265.        if test ! -d $${dir}; then \
  266.          mkdir $${dir}; fi; \
  267.     done
  268.  
  269. test: check
  270. check:    gzip$X
  271.     ./gzip -6 < $(srcdir)/texinfo.tex > _gztest.gz
  272.     @LANG=""; export LANG; if test `wc -c < _gztest.gz` -eq 30890; then \
  273.        true; \
  274.     else \
  275.        echo FAILED gzip test: incorrect size; \
  276.     fi
  277.     rm -f _gztest
  278.     ./gzip -d _gztest.gz
  279.     @if cmp _gztest $(srcdir)/texinfo.tex; then \
  280.        echo gzip test OK; \
  281.     else \
  282.        echo FAILED gzip test: incorrect decompress; \
  283.     fi
  284.     rm -f _gztest*
  285.  
  286. TAGS: $(SRCS) $(HDRS)
  287.     cd $(srcdir); etags $(SRCS) $(HDRS)
  288.  
  289. Makefile: Makefile.in ./config.status
  290.     ./config.status
  291.  
  292. ./config.status: configure
  293.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  294.  
  295. configure: configure.in
  296.     @echo Warning: configure is out of date
  297. #    cd $(srcdir); autoconf
  298.  
  299. clean:
  300.     rm -f *$O gzip$X gunzip$X ungzip$X $(ZCAT)$X add$X sub$X a.out core
  301.     rm -f $(G)zcmp $(SCRIPTS) _gztest*
  302.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  303.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  304.  
  305. mostlyclean: clean
  306.  
  307. distclean: clean
  308.     rm -f Makefile config.status
  309.  
  310. realclean: distclean
  311.     rm -f TAGS gzip.info* gzip.doc
  312.  
  313. dist: $(DISTFILES) Makefile
  314.     d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  315.                 -e q revision.h` ; \
  316.     rm -f ../$$d; \
  317.     ln -s `pwd` ../$$d; \
  318.     cd ..; \
  319.     files=""; \
  320.     for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
  321.     GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
  322.     rm -f $$d
  323.  
  324. zipdist: $(DISTFILES) Makefile
  325.     zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  326.               -e s/[.]//g -e q revision.h` $(DISTFILES)
  327.  
  328. # Actual build-related targets
  329.  
  330. gzip$X:    Makefile $(OBJS)
  331.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  332.     rm -f gunzip$X $(ZCAT)$X
  333.     ln gzip$X gunzip$X
  334.     ln gzip$X $(ZCAT)$X
  335.  
  336. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  337. util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
  338.  
  339. gzip$O unlzw$O: revision.h lzw.h
  340.  
  341. bits$O unzip$O util$O zip$O: crypt.h
  342.  
  343. gzip$O getopt$O: getopt.h
  344.  
  345. match$O: match.S
  346.     $(ASCPP) $(srcdir)/match.S > _match.s
  347.     $(CC) -c _match.s
  348.     mv _match$O match$O
  349.     rm -f _match.s
  350.  
  351. $(G)zdiff: zdiff.in
  352.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zdiff.in > $@
  353.     chmod 755 $@
  354.  
  355. $(G)zgrep: zgrep.in
  356.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zgrep.in > $@
  357.     chmod 755 $@
  358.  
  359. $(G)zmore: zmore.in
  360.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zmore.in > $@
  361.     chmod 755 $@
  362.  
  363. $(G)znew: znew.in
  364.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/znew.in > $@
  365.     chmod 755 $@
  366.  
  367. $(G)zforce: zforce.in
  368.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zforce.in > $@
  369.     chmod 755 $@
  370.  
  371. gzexe: gzexe.in
  372.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/gzexe.in > $@
  373.     chmod 755 $@
  374.  
  375. gzip.info: gzip.texi
  376.     cd $(srcdir); makeinfo gzip.texi
  377.  
  378. gzip.dvi: gzip.texi
  379.     cd $(srcdir); texi2dvi gzip.texi
  380.  
  381. gzip.doc: gzip.1
  382.     nroff -man $(srcdir)/gzip.1 | col -b | uniq > gzip.doc
  383.  
  384. # Prevent GNU make v3 from overflowing arg limit on SysV.
  385. .NOEXPORT:
  386.  
  387. # end of file
  388.